_pick() {
  local p="$1" f d; shift
  for f; do
    d="$SRC/$p/${f#$PKG/}"
    mkdir -p "$(dirname "$d")"
    mv "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done

}
  milis-meson $isim build \
	-D split-usr=true \
	-D smack=true \
	-D acl=true \
	-D pam=true \
	-D rootlibexecdir=/usr/lib
   ninja -C build
 

  DESTDIR="${PKG}" meson install -C build
  cd "$PKG"

  _pick libelogind usr/lib/pkgconfig 
  _pick libelogind usr/include
  _pick libelogind usr/lib/libelogind*.so*

  rm -rf "$PKG"/usr/share/doc

mv $PKG/bin/elogind-inhibit "$PKG"/usr/bin/elogind-inhibit
mv $PKG/bin/loginctl "$PKG"/usr/bin/loginctl
#cp -r $PKG/bin/* "$PKG"/usr/bin/
rmdir $PKG/bin
mv $PKG/lib/libelogin* "$PKG"/usr/lib/
mv $PKG/lib/* "$PKG"/usr/lib/

rmdir $PKG/lib
